package com.e3.basdoc.region.client;

import java.util.List;

import com.e3.basdoc.region.model.RegionModel;
import com.e3.template.tgf.TGFPagingGridPanel;
import com.extjs.gxt.ui.client.data.PagingLoadConfig;
import com.extjs.gxt.ui.client.data.PagingLoadResult;
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
import com.google.gwt.user.client.rpc.AsyncCallback;

public class RegionGridPanel extends TGFPagingGridPanel<RegionModel> {
	
	private RegionRPCServiceAsync service = RegionRPCService.Util.getInstance();
	
	@Override
	protected List<ColumnConfig> getGridColumnConfigs() {
		return RegionHelper.INSTANCE.getGridColumnConfigs();
	}
	
	@Override
	protected void getPagingData(PagingLoadConfig config,AsyncCallback<PagingLoadResult<RegionModel>> callback){
		service.getPagingRegions(config, callback);
	}

}
